<?php
include('../conf.php');
$function = $_REQUEST['function'];

if($function=="getNews"){
	$comp_id = $_REQUEST['comp_id'];
	$sql = "select * from tb_news where comp_id=? order by news_date desc limit 3";
	$conn->SetFetchMode(ADODB_FETCH_ASSOC);
	$rs = $conn->Execute($sql, array($comp_id));
	$data = $rs->GetRows();
	echo json_encode($data);
} else {
	exit('Thanks');
}
?>